package com.xw.controller;


import com.xw.mapper.Mymapper;
import com.xw.pojo.Page;
import com.xw.pojo.User;
import com.xw.pojo.User02;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ConPage {
    @Autowired
    private Mymapper mymapper;
  @Autowired
    private Page page;

  //分页查询

  @GetMapping("page")
    private Object  finfpage(int pageIndex){
        page.setPage(pageIndex);
        Integer pageStartRow = page.getPageStartRow();
        Integer pageSize = page.getPageSize();
        List<User02> list = mymapper.findpage(pageStartRow,pageSize);

         return  list;

    }
}
